From 0e08ff19ba148fcba5dc68040bac8209d6a10202 Mon Sep 17 00:00:00 2001 From: Luc Pionchon Date: Fri, 10 May 2013 13:30:08 +0300 Subject: [PATCH] Add doc to set markup and accelerator on a MenuItem. https://bugzilla.gnome.org/show_bug.cgi?id=699289 --- gtk/gtkmenuitem.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 13d0969afa..b33d79d3b1 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -52,15 +52,28 @@ * @See_also: #GtkBin, #GtkMenuShell * * The #GtkMenuItem widget and the derived widgets are the only valid - * childs for menus. Their function is to correctly handle highlighting, + * children for menus. Their function is to correctly handle highlighting, * alignment, events and submenus. * - * As it derives from #GtkBin it can hold any valid child widget, altough - * only a few are really useful. + * As a GtkMenuItem derives from #GtkBin it can hold any valid child widget, + * although only a few are really useful. + * + * By default, a GtkMenuItem sets a #GtkAccelLabel as its child. + * GtkMenuItem has direct functions to set the label and its mnemonic. + * For more advanced label settings, you can fetch the child widget from the GtkBin. + * + * + * Setting markup and accelerator on a MenuItem + * new label with markup"); + * gtk_accel_label_set_accel (GTK_ACCEL_LABEL (child), GDK_KEY_1, 0); + * ]]> + * * * * GtkMenuItem as GtkBuildable - * The GtkMenuItem implementation of the GtkBuildable interface + * The GtkMenuItem implementation of the #GtkBuildable interface * supports adding a submenu by specifying "submenu" as the "type" * attribute of a <child> element. * -- 2.30.2